﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/MainPage.master" AutoEventWireup="true" CodeFile="GoodsStocksManage.aspx.cs" Inherits="Manage_GoodsStocksManage" %>
<%@ Import Namespace="Shopping.Common" %>
<%@ Import Namespace="Shopping.Model" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Content" Runat="Server">
<script type="text/javascript" src="/Manage/Public/AppHelper.js"></script>
<script type="text/javascript" src="/Manage/Js/GoodsStocksManage.js"></script>
<script language="javascript">

</script>

<table width="99%" border="0" cellspacing="0" cellpadding="0" class="table" align="center">
  <tr>
    <td align="center"><img src="/Manage/Images/sousuo.gif" />商品名称：
     
      <input name="txtKeyWords" type="text" id="txtKeyWords" size="15"  class="border6" value=" <%=q.KeyWords %>"/>
      分类：
      <select name="ddlCategoryOfSearch" id="ddlCategoryOfSearch" onchange="GetBrands(this.options[this.selectedIndex].value,'ddlBrandOfSearch');">
        <option value="">--不限--</option>
		<%=SelectOptionOfCategory%>
        </select> 
      品牌：
      <select name="ddlBrandOfSearch" id="ddlBrandOfSearch">
        <option value="">--不限--</option>
		<%=SelectOptionOfBrand%>
        </select>
      库房：
      <select name="ddlStoreOfSearch" id="ddlStoreOfSearch">
        <option value="">--不限--</option>
		<%=SelectOptionOfStores%>
      </select> 
      库存数量：
      <select name="ddlCond" id="ddlCond"> 
        <option value="">不限</option>
        <option value=">="  <%=q.Cond ==">="?"Selected":"" %>>&gt;=</option>
        <option value="<="  <%=q.Cond =="<="?"Selected":"" %>>&lt;=</option>
      </select> 
      <input name="txtQuantityOfSearch" type="text" class="border6" id="txtQuantityOfSearch" size="8" value="<%=q.Quantity %>" />
      <input name="btnSearch" type="button" id="btnSearch" value="搜 索" class="btn1" onclick="GoToSearch()" />[<a href="GoodsStocksManage.aspx" class="red bold">查看全部</a>]</td>
  </tr>
</table>
<br />
<table width="99%" border="0" cellspacing="0" cellpadding="0" class="table" align="center"  >
  <tr class="TableHeadRow">
    <td colspan="7" align="left" class="HeadTitle">&gt;&gt;库存管理</td>
    </tr>
  <tr class="TableHeadRow">
    <td width="80" align="center">商品编号</td>
    <td align="center">商品名称</td>
    <td align="center">所属品牌</td>
    <td align="center">所属分类</td>
    <%
        if (q.StoreID > 0)
        {
       %>
    <td width="250" align="center">所在库房</td>
     <%} %>
    <td width="100" align="center">库存数量  <a href="<%=Utility.GetNewUrl("Sorts","1",false) %>" title="降序排列">↓</a><a href="<%=Utility.GetNewUrl("Sorts","2",false) %>" title="升序排列">↑</a> </td>
    <td width="200" align="center">管理  [<a href="StockInsManage.aspx" class="bold">进货</a>] [<a href="StockOutsManage.aspx" class="bold">出货</a>]</td>
  </tr>

  <%
      if (list != null)
      {
          for (int i = 0; i < list.Count; ++i)
          {
              GoodsStockInfo d = list[i];
    %>

  <tr>
    <td align="center"><%=d.StockInfo.GoodsID %></td>
    <td align="left"><a href="/Show.aspx?GoodsID=<%=d.StockInfo.GoodsID %>" target="_blank"><%=d.GoodsName %></a></td>
    <td align="center"><%=d.Brand.Name %></td>
    <td align="center"><%=d.Category.Name %></td>
     <%
         if (q.StoreID > 0)
         {
       %>
    <td align="center"><%=d.StoreName%></td>
    <%} %>
    <td align="center"><%=d.StockInfo.Stocks %></td>
    <td align="center">[ <a href="javascript:ViewRecords(<%=d.StockInfo.GoodsID %>,<%=d.StockInfo.StoreID %>);" class="green">进出货记录</a> ]  </td>
  </tr>
  <%} %>
 <tr>
    <td colspan="7" align="center" > <span class="page" >
         <%=Utility.GetPageLine(Utility.GetWebPageUrlNoCurPage(), q.CurPage, q.PageSize,10, q.TotalCount)%>  
        </span></td>
    </tr>
    <%}
      else
      { %>
  <tr>
    <td colspan="7" align="center" class="red">[ 未找到任何库存信息！]</td>
    </tr>
    <%} %>
</table>
</asp:Content>

